import requests


class Ihrmlogin:
    def login(self,req_body):
        result = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                      headers={"Content-Type": "application/json"},
                      json=req_body)

        return result
if __name__ == '__main__':
    login = Ihrmlogin()
    req_body={
        "mobile": "13800000002",
        "password": "123456"
    }
    result = login.login(req_body)
    print(result.json())
